/* 修改管理页面整体布局 */
.admin-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 顶部栏样式 */
.admin-header {
    background: #fff;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

/* 主要内容区域容器 */
.admin-main-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    flex: 1;
}

/* 侧边栏样式 */
.admin-sidebar {
    background: #2c3e50;
    color: #fff;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 73px); /* 减去顶部栏高度 */
    position: sticky;
    top: 73px; /* 顶部栏高度 */
}

.admin-sidebar .admin-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.admin-sidebar h1 {
    font-size: 1.5rem;
    margin: 0;
}

.admin-nav ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.admin-nav li {
    margin: 0.5rem 0;
}

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.admin-nav a:hover,
.admin-nav li.active a {
    background: rgba(255,255,255,0.1);
}

.admin-nav i {
    width: 20px;
    text-align: center;
}

.admin-footer {
    margin-top: auto;
    padding: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.back-to-site {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.back-to-site:hover {
    background: rgba(255,255,255,0.1);
}

/* 主内容区样式 */
.admin-main {
    background: #f8f9fa;
    padding: 2rem;
    overflow-y: auto;
}

.header-search {
    position: relative;
}

.header-search input {
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    width: 300px;
}

.header-search i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
}

.user-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 0.5rem 0;
    display: none;
}

.header-user:hover .user-menu {
    display: block;
}

.user-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: #333;
    text-decoration: none;
}

.user-menu a:hover {
    background: #f8f9fa;
}

/* 内容区域样式 */
.admin-content {
    padding: 2rem;
    flex: 1;
    width: 100%;  /* 确保占满整个宽度 */
    max-width: 100%;  /* 防止内容溢出 */
    box-sizing: border-box;  /* 确保padding不会导致宽度溢出 */
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

/* 仪表盘样式 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-card i {
    font-size: 2rem;
    color: #4a90e2;
}

.stat-info h3 {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

.stat-info p {
    margin: 0.25rem 0 0;
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

/* 最近活动样式 */
.recent-activity {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.activity-list {
    margin-top: 1rem;
}

.activity-item {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    display: grid;
    grid-template-columns: auto auto 1fr;
    gap: 1rem;
    align-items: center;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-time {
    color: #666;
    font-size: 0.9rem;
}

.activity-type {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.activity-content {
    color: #333;
} 